<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
	<%@include file="/WEB-INF/base/commRoot.jsp"%>
    
    <title>修改惠信号</title>

	<link href="/css/public.css" type="text/css" rel="stylesheet" />
	<link href="/css/style.css" type="text/css" rel="stylesheet" />
    <link href="/css/account.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="/js/rsa/RSA.js"></script> 
	<script type="text/javascript" src="/js/rsa/BigInt.js"></script> 
	<script type="text/javascript" src="/js/rsa/Barrett.js"></script> 
	<script type="text/javascript" src="/js/rsa/RsaDataUtil.js"></script>
	<script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
	<script type="text/javascript" src="/js/view/user/login.js"></script>
	<script type="text/javascript" src="/js/view/account/sms.js"></script>
	<script type="text/javascript" src="/js/view/account/safe.js"></script>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript">
	    $(document).ready(function () {
	        $(".logo_grid").click(function () {
	            $(this).toggleClass("act").find(".desc").toggle();
	        });
	    });
    </script>
    
<!--[if !IE]><!--><script>

if (/*@cc_on!@*/false) {

    document.documentElement.className+=' ie10';

}

</script><!--<![endif]-->
  </head>
  
  <body>
   <input id="module" type="hidden" value="<s:property value='#application.module'/>">
<input id="empoent" type="hidden" value="<s:property value='#application.empoent'/>">
<!--header-->
<jsp:include page="/loginHead.jsp"></jsp:include>
<!--/header-->
<div class="main_bg">        	
	<div class="regist">
    	<h3 class="tit_hui_step1"></h3>
        <form id="toEditAccNameForm" name="toEditAccNameForm" action="${root}/userAction_toEditAccNameNext.action" method="post">
        <ul>
        	<li class="clearfix">
            	<label>旧惠信号：</label>
                <div class="position"><input id="accName" name="userRegister.accName" value="<s:property value="userRegister.accName"/>" type="text" class="input" maxlength="20" placeholder="请输入您的惠信号" onblur="testOldAccName();" /><span class="in_dea_text"></span></div>
                <p class="suc_tips" id="accNameRight" style="display:none;"></p>
                <p class="err_tips" id="accNameMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>密码：</label>
                <div class="position"><input id="pwd"  type="password" class="input" maxlength="20" placeholder="请输入密码" onblur="testPwd();" />
                <input id="rsaPwd" name="rsaPwd" type="hidden"/>
                <span class="in_dea_text"></span></div>
                <p class="suc_tips" id="pwdRight" style="display:none;"></p>
                <p class="err_tips" id="pwdMsg" style="display:none;"></p>
            </li>
            <li class="add_tips">温馨提醒：惠信号只能修改一次，请确定好再修改</li>
            <li class="clearfix"><a href="javascript:void(0);" class="mar_li btn l submitToEditAccNameForm">下一步</a></li>
        </ul>
        </form>
    </div>
	

</div>
<!--/main-->
<!--footer-->
<jsp:include page="/footer.jsp"></jsp:include>

<script type="text/javascript">
$(".submitToEditAccNameForm").bind("click", function(){
	if (!testOldAccName() || !testPwd()) {
		return;
	}
	$("#rsaPwd").val(rsaData($("#pwd").val()));
	$("#toEditAccNameForm").submit();
})

<s:if test="dataMap.pwdErrorMsg != null && dataMap.pwdErrorMsg !='' ">
	$("#pwdMsg").show();
	$("#pwdMsg").text("<s:property value="dataMap.pwdErrorMsg"/>");
</s:if>

<s:if test="dataMap.accNameErrorMsg != null && dataMap.accNameErrorMsg !='' ">
	$("#accNameMsg").show();
	$("#accNameMsg").text("<s:property value="dataMap.accNameErrorMsg"/>");
</s:if>

</script>

</body>
</html>